package luob.common;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;
import com.jfinal.core.Controller;
import luob.iservice.module.Partner;

/**
 * Created by luob on 15/6/13.
 */
public class MyBaseInterceptor implements Interceptor {
    public void intercept(ActionInvocation ai) {
        Controller ctx = ai.getController();
        ctx.setAttr("global_agent", Partner.me.findById(0));
        System.out.println("MyBaseInterceptor");
        ai.invoke();
    }
}
